﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace SqlSugarCoreDemo.DBSqlSugar
{
    /// <summary>
    /// 管理员登陆票据表
    /// </summary>
    [SugarTable("SysManagerToken", TableDescription = "管理员登陆票据表")]
    public partial class SysManagerToken
    {
        /// <summary>
        /// 票据ID
        /// </summary>
        [Display(Name = "票据ID")]
        [SugarColumn(ColumnDescription = "票据ID", IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 访问应用ID
        /// </summary>
        [Display(Name = "访问应用ID")]
        [SugarColumn(ColumnDescription = "访问应用ID")]
        public int appsId { get; set; }
        /// <summary>
        /// 管理员ID
        /// </summary>
        [Display(Name = "管理员ID")]
        [SugarColumn(ColumnDescription = "管理员ID")]
        public int managerId { get; set; }
        /// <summary>
        /// 管理员用户名
        /// </summary>
        [Display(Name = "管理员用户名")]
        [SugarColumn(ColumnDescription = "管理员用户名")]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string userName { get; set; }
        /// <summary>
        /// 访问票据(89位随机大小写字母、数字组合)
        /// </summary>
        [Display(Name = "访问票据")]
        [SugarColumn(ColumnDescription = "访问票据")]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string userToken { get; set; }
        /// <summary>
        /// 指定刷新时间（在这时间之后可调用刷新接口）
        /// </summary>
        [Display(Name = "指定刷新时间")]
        [SugarColumn(ColumnDescription = "指定刷新时间")]
        public DateTime? refreshTime { get; set; }
        /// <summary>
        /// userToken过期时间
        /// </summary>
        [Display(Name = "过期时间")]
        [SugarColumn(ColumnDescription = "过期时间")]
        public DateTime? expiresTime { get; set; }
        /// <summary>
        /// 其他Key值，JSON格式，当前为NULL
        /// </summary>
        [Display(Name = "其他Key值")]
        [SugarColumn(ColumnDescription = "其他Key值", IsNullable = true)]
        [StringLength(2000, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string otherKey { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [Display(Name = "添加时间")]
        [SugarColumn(ColumnDescription = "添加时间")]
        public DateTime? addTime { get; set; }
        /// <summary>
        /// 上一个访问唯一票据，新旧票据交替临时1分钟同时使用
        /// </summary>
        [Display(Name = "旧票据")]
        [SugarColumn(ColumnDescription = "旧票据", IsNullable = true)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string oldUserToken { get; set; }
        /// <summary>
        /// oldUserToken过期时间
        /// </summary>
        [Display(Name = "旧票据过期时间")]
        [SugarColumn(ColumnDescription = "旧票据过期时间")]
        public DateTime? oldExpiresTime { get; set; }
    }
}
